<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="java.sql.*"%>

<%

String connectionURL = "jdbc:mysql://localhost/boa";

Connection connection = null;

Statement statement = null;

ResultSet rs = null;

%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Goods Receipt Note</title>
</head>
<body> 
<%
String tableStr="INSERT INTO grn values('$grn_no','$date_grn','$invoice_no','$date_inv','$supp_name','$stock_item','$group_item','$inw_q','$rate','$net_amt','$inp_tax','$total','$narration')";
Class.forName("com.mysql.jdbc.Driver");

connection = DriverManager.getConnection(connectionURL,"root","root");

statement = connection.createStatement();

statement.executeUpdate(tableStr);

connection.close();

%>

      <br><br><br>
        <table align = "center" >
            <tr>
                <td> GRN Number </td> <td><input type ="text" name ="txtno"></td>
            </tr>
          
            <tr>
                <td> Date Of GRN </td><td> <input type ="text" name ="txtdate"></td>
            </tr>
           
            
            <tr>
                <td> Invoice Number </td><td> <input type ="text" name ="txtno"></td>
            </tr>
           
            <tr>
                <td> Date Of Invoice Number </td><td> <input type ="text" name ="txtdateno" ></td>
            </tr>
           
            
            <tr>
                <td> Supplier Name </td><td> <input type ="text" name ="txtname" maxlength="20"></td>
            </tr>
           
            <tr>
                <td> Stock Item Name </td><td> <input type ="text" name ="txtName" maxlength="10"></td>
            </tr>
           
             <tr>
                <td> Group </td><td> <input type ="text" name ="txtgroup" ></td>
            </tr>
           
            <tr>
                <td> Inward Quantity </td><td> <input type ="text" name="txtquantity" ></td>
            </tr>
           
            <tr>
                <td> Rate  </td><td> <input type ="text" name ="txtrate" ></td>
            </tr>
            
           <tr>
                <td> Net Amount </td><td> <input type ="text" name ="txtamt" ></td>
            </tr>
          
           <tr>
                <td> Input Tax </td><td> <input type ="text" name ="txtamt" ></td>
            </tr>
          
           <tr>
                <td> Total Amount </td><td> <input type ="text" name ="txtamt" ></td>
            </tr>
          
            <tr>
                <td> Narration </td><td> <input type ="text" name ="txtamt" ></td>
            </tr>
           
        </table>
</body>
</html>
